/*
 * @Author: yao
 * @Date: 2024-10-31 10:23:32
 * @LastEditTime: 2024-11-19 11:32:31
 * @LastEditors: yao
 * @Description:
 * @FilePath: \jdev-web\src\main.ts
 */
import "./assets/main.css";
import { createApp } from "vue";
import { createPinia } from "pinia";
import PrimeVue from "primevue/config";
import App from "./App.vue";
import router from "./router";
import ConfirmationService from "primevue/confirmationservice";
import ToastService from "primevue/toastservice";
import "primeicons/primeicons.css";
import ThemeSwitcher from "./components/ThemeSwitcher/index.vue";
import AppState from "./plugins/appState.js";
import Noir from "./presets/Noir.js";
import "./router/guards";
export const app = createApp(App);

app.use(createPinia());
app.use(AppState);
app.use(router);
app.use(ConfirmationService);
app.use(ToastService);
app.use(PrimeVue, {
  theme: {
    preset: Noir,
    options: {
      prefix: "p",
      darkModeSelector: "system",
    },
  },
});
app.component("ThemeSwitcher", ThemeSwitcher);
app.mount("#app");
